package id.net.iconpln.bb.server.controller;

import java.util.List;
import id.net.iconpln.bb.server.model.persistence.MasterModul;
import id.net.iconpln.bb.server.service.BbServices;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;


	@Controller
	public class Index {

		@Autowired
		private BbServices crmReportService;
		
		protected final Log logger = LogFactory.getLog(getClass());

		@RequestMapping(value="/index.htm",method=RequestMethod.GET)
	    public ModelAndView fsession(HttpServletRequest request, HttpSession session){
			
			List<MasterModul> p = crmReportService.getMasterModul();				
			ModelAndView m = new ModelAndView("page");
			
			String message = "";
			
			logger.info(" jml : " + p.size());
			m.addObject(message,"kokomJELEK");
			
			
	        return null;	        
		}		

}
